home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / computer-janitor.postinst < prev    next >
Encoding:
Text File  |  2009-04-17  |  1.1 KB  |  38 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. # Create /var/lib/computer-janitor if it doesn't exist and we're being
  6. # installed.
  7.  
  8. case "$1" in
  9.     configure)
  10.         # Make sure we have a directory to put the state file in.
  11.         [ -e /var/lib/computer-janitor ] || mkdir /var/lib/computer-janitor
  12.  
  13.         # If this system has or had system-cleaner installed, it might
  14.         # have an old state file lying around. Let's copy that to the new
  15.         # location, but only if there isn't one there already.
  16.         for x in cruft-remover system-cleaner
  17.         do
  18.             if [ ! -e /var/lib/computer-janitor/state.dat ] &&
  19.                [ -e /var/lib/$x/state.dat ]
  20.             then
  21.                 cp /var/lib/$x/state.dat /var/lib/computer-janitor
  22.             fi
  23.         done
  24.         ;;
  25. esac
  26.  
  27.  
  28. # Automatically added by dh_pycentral
  29. rm -f /var/lib/pycentral/computer-janitor.pkgremove
  30. if which pycentral >/dev/null 2>&1; then
  31.     pycentral pkginstall computer-janitor
  32.     if grep -qs '^computer-janitor$' /var/lib/pycentral/delayed-pkgs; then
  33.         sed -i '/^computer-janitor$/d' /var/lib/pycentral/delayed-pkgs
  34.     fi
  35. fi
  36. # End automatically added section
  37.  
  38.